Skip to content

Conversation

@AAladeen
Copy link
Contributor

Email Domain Validator Flow Action

ServiceNow Flow Action for validating email addresses against an approved domain allowlist.

Purpose

This Flow Action validates email domains in ServiceNow workflows, ensuring that only users
from approved organizations can access resources or complete processes. It provides detailed
validation results for workflow routing, user notifications, and audit logging.

Features

  • Email format validation with regex pattern matching
  • Domain extraction and comparison against allowlist
  • Comprehensive error handling and input validation
  • Detailed status codes for workflow branching
  • Normalized output (lowercase, trimmed)
  • Error logging

Inputs

| email | String | Yes | Email address to validate (e.g., [email protected]) |
| allowed_domains | String | Yes | Comma-separated list of approved domains (e.g., company.com, partner.org, trusted.net) |

Outputs

| isValid | Boolean | Whether email domain is approved (true/false) |
| statusCode | String | Machine-readable status: APPROVED, REJECTED, or ERROR |
| email | String | Normalized (lowercase, trimmed) email address |
| domain | String | Extracted domain from email |
| message | String | Human-readable validation result |
| errorMessage | String | Error details if validation fails |
| allowedDomainsCount | Number | Total count of allowed domains |

admin.thorsson added 2 commits October 23, 2025 05:52
…st. It normalizes the email input, extracts the domain portion, and compares it against approved domains. Returns detailed validation status, normalized email, extracted domain, and descriptive messages for workflow routing and user notifications.
@github-actions
Copy link

Valid PR for ActionPack

Thank you for your contribution. This PR complies with the CONTRIBUTING.md.
A maintainer will review this shortly. In the meantime, Happy Hacking!

@SapphicFire SapphicFire self-assigned this Oct 24, 2025
Copy link
Contributor

@SapphicFire SapphicFire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your submission. It appears that this pull request contains more files than described in the title. Please review and update the pull request to either remove the extra/unintended files or to update the description to be more comprehensive. Ensure your contributions are meaningful and adhere to the project’s standards. You can create a new branch on your forked repository to avoid accidental inclusions of new commits in the future.

Closing this for now. Once you make additional changes, feel free to re-open this Pull Request or create a new one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is showing on your branch. Please sync your main branch, and consider creating a new branch to introduce only the domain action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants